From: Jo-Philipp Wich Date: Tue, 24 Sep 2019 05:59:04 +0000 (+0200) Subject: luci-base: form.js: allow overriding remove action in Table/GridSections X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=0068c3bd49eec03b70679f8d7787bcfe104492a9;p=project%2Fluci.git luci-base: form.js: allow overriding remove action in Table/GridSections Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 07cacb324e..372773474f 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -1211,10 +1211,7 @@ var CBITableSection = CBITypedSection.extend({ E('button', { 'title': btn_title || _('Delete'), 'class': 'cbi-button cbi-button-remove', - 'click': L.ui.createHandlerFn(this, function(sid, ev) { - this.map.data.remove(config_name, sid); - return this.map.save(null, true); - }, section_id) + 'click': L.ui.createHandlerFn(this, 'handleRemove', section_id) }, [ btn_title || _('Delete') ]) ); }